Printing an array

The primary example’s code is located in the «FastReport Demos\PrintArray» directory. Let us explain several details.

To print an array, we use a report with one «Master Data» band, which will be presented as many times, as there are elements in the array. To do this, place a «TfrxUserDataSet» component on the form, and then set it’s properties (it is possible to do it in a code, as shown in our example):

RangeEnd := reCount

RangeEndCount := a number of elements in an array

After that, we connect the data-band to the «TfrxUserDataSet» component. To represent the array element, place a text object with the [element] line inside the «Master Data» band. The «element» variable is filled using a «TfrxReport.OnGetValue» event.